{% extends "base.html" %}
{% block head %}
{% endblock %}
{% block content %}
<h1>{{ title }}</h1>

<script type="text/javascript" src='http://tmrweb.ikito.ru/js/status_info/status_info_init.js'></script>

<div style='margin-left: 10px'>
<script type="text/javascript">
TMR_STATUS_BAR_WIDTH = 415;
</script>
<a id="show_player_link" onclick='show_player()'>Показать плеер</a>
<script type="text/javascript">
function show_player() {
    var a = document.getElementById('show_player_link');
    var audio = document.createElement('audio');
    audio.id = 'tmradio_player';
    audio.src = "http://stream.tmradio.net:8180/live.mp3";
    audio.type = "audio/mp3";
    audio.controls = "controls";
    audio.style.width = '420px';
    a.parentNode.insertBefore(audio, a);
    a.parentNode.removeChild(a);
};
</script>
<script type="text/javascript" src='http://tmrweb.ikito.ru/js/status_info/status_info_bar.js'></script>
</span>
</div>

{% include "vote_controls.html" %}

<script type="text/javascript">
    function tmr_on_new_status(data) {
        if (typeof(unblock_vote) != 'undefined') unblock_vote();
        CURR_STATUS = data;  
    };

    function tmr_before_status_update(data) {
        update_tmr_status_bar_progress(data);
        start_auto_update_tmr_status_bar(data);
    };
</script>

{% if user_profile %}
<script type="text/javascript">
    TMR_WEBCHAT_NICKNAME = '{{user_profile.nickname_or_name}}';
    TMR_WEBCHAT_LIMIT = 80;
</script>
{% endif %}
<script type="text/javascript" src='/chat/js/webchat_init.js'></script>
<div id="tmr_playlog"></div>
{% endblock %}

{% block sidebar %}
<li class="nav-header">Эфир</li>
<li>
    <input id="bannerMode" type="hidden" value="0">
    <div id='timerBanner'>
        <a href="http://www.tmradio.net/live/">Прямой эфир</a> каждый четверг в 21:00 по Москве
    </div>
    <script src="/js/tsntimer.js" type="text/javascript" language="javascript" charset="utf-8" /></script>
</li>

<li class="nav-header">Голосовалка</li>
<li>
    <div id="upoll_container"></div><script type="text/javascript" src="/js/pollfuncs.js"></script>
</li>

<li class="nav-header">#tmradio</li>
<li>
    <iframe class="twitter" src="http://files.tmradio.net/twitter.html"/></iframe>
</li>
{% endblock %}
